package com.choupin.choupin.entity;

import com.fasterxml.jackson.databind.ser.Serializers;

import java.math.BigDecimal;
import java.util.Objects;

//会员类
public class Member extends BaseEntity {
     Integer id; //会员id
     String icon; //会员图标
     String  name;//会员内容展示
     String  content;//会员内容说明
     BigDecimal price;//会员价格
     Integer addWeight;//增加的概率

    public Member() {
    }

    public Member(Integer id, String icon, String name, String content, BigDecimal price, Integer addWeight) {
        this.id = id;
        this.icon = icon;
        this.name = name;
        this.content = content;
        this.price = price;
        this.addWeight = addWeight;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getAddWeight() {
        return addWeight;
    }

    public void setAddWeight(Integer addWeight) {
        this.addWeight = addWeight;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Member member = (Member) o;
        return Objects.equals(id, member.id) &&
                Objects.equals(icon, member.icon) &&
                Objects.equals(name, member.name) &&
                Objects.equals(content, member.content) &&
                Objects.equals(price, member.price) &&
                Objects.equals(addWeight, member.addWeight);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, icon, name, content, price, addWeight);
    }

    @Override
    public String toString() {
        return "Member{" +
                "id=" + id +
                ", icon='" + icon + '\'' +
                ", name='" + name + '\'' +
                ", content='" + content + '\'' +
                ", price=" + price +
                ", addWeight=" + addWeight +
                '}';
    }
}
